package com.antoni.sboot_task.controller;

import com.antoni.sboot_task.service.AsyncSerive;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author Zhang Chao
 * @Date 2021/5/12 21:15
 * @Version 1.0
 */
@RestController
public class AsyncController {

    @Autowired
    AsyncSerive asyncSerive;

    @RequestMapping("/hello")
    public String hello(){
        asyncSerive.hello();//停止了三秒
        return "OK";
    }
}
